﻿@model List<GameSchool.Models.ViewModels.LevelViewModel>

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


<h2>@ViewBag.Message</h2>
              
                    @foreach (var m in Model)
                    {
                       <section class="levelItem">
                        <section class="levelheader">
                        <h3>Borð @m.levelNumber</h3>
                        </section>
                        @foreach (var assignment in m.assignmentList)
                        {
                            <section class="assignment">
                                @assignment.assignmentType
                                @assignment.assignmentID
                            </section>
                        }
                        </section>
                   }
      <script type="text/javascript">
          $(document).ready(function () {
              $(".assignment").hide();
              //toggle the componenet with class msg_body
              $(".levelheader").click(function () {
                  $(this).next(".assignment").slideToggle(250);
              });
          });
</script>

<style type="text/css">

.levelItem { border: 1px solid black; min-height: 2em; height: auto;}
.levelItem h3 { margin: 0.5em; }

</style>

       
                  
                    
                    

